﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZK.Common
{
    /// <summary>
    /// 委托帮助类（非静态类）
    /// </summary>
    public class DelegateHelper
    {

        /// <summary>
        /// 远瑞通读卡器重启
        /// </summary>
        /// <param name="btAryBuffer"></param>
        public delegate void YRTResetDelegate();
        /// <summary>
        /// 远瑞通读卡器重启
        /// </summary>
        public static YRTResetDelegate YRTResetEvent;
        /// <summary>
        /// 车牌识别一体机
        /// </summary>
        /// <param name="carNum"></param>
        /// <param name="cameraIp"></param>
        public delegate void CameraGetCarNumDelegate(string carNum, string cameraIp);
        /// <summary>
        /// 车牌识别一体机
        /// </summary>
        public static CameraGetCarNumDelegate CameraGetCarNumEvent;

        /// <summary>
        /// 卡号车牌号同时存在的情况
        /// </summary>
        public delegate void SetCarNumDelegate();
        /// <summary>
        /// 卡号车牌号同时存在的情况
        /// </summary>
        public static SetCarNumDelegate SetCarNumEvent;

        /// <summary>
        /// 读卡器接受的数据
        /// </summary>
        /// <param name="btAryBuffer"></param>
        public delegate void MessageReceivedEventHandler(byte[] btAryBuffer);
        /// <summary>
        /// 读卡器接受的数据
        /// </summary>
        public static MessageReceivedEventHandler MessageReceived;

        /// <summary>
        /// mw-102n读卡器接受的数据
        /// </summary>
        /// <param name="cardNum"></param>
        public delegate void MW_102N_MessageReceivedDelegate(string cardNum);
        /// <summary>
        /// mw-102n读卡器接受的数据
        /// </summary>
        public static MW_102N_MessageReceivedDelegate MW_102N_MessageReceivedEvent;

        /// <summary>
        /// 室内读卡器接收的数据
        /// </summary>
        /// <param name="cardNum"></param>
        public delegate void MWSNMessageReceivedDelegate(string cardNum);
        /// <summary>
        /// 室内读卡器接收的数据
        /// </summary>
        public static MWSNMessageReceivedDelegate MWSNMessageReceivedEvent;

        /// <summary>
        /// delegate of LingMei
        /// </summary>
        /// <param name="eventMsg"></param>
        /// <param name="parstr"></param>
        /// <returns></returns>
        public delegate int TaskonTAudioCastEvent(int eventMsg, string parstr);

        /// <summary>
        /// 地磅数据委托
        /// </summary>
        /// <param name="weight"></param>
        public delegate void WeightDataCallbackDelegate(double weight);
        /// <summary>
        /// 地磅数据委托
        /// </summary>
        public static WeightDataCallbackDelegate WeightCallbackEvent;

        /// <summary>
        /// 主页自适应之后，传递当前宽高给子panel
        /// </summary>
        /// <param name="Width"></param>
        /// <param name="height"></param>
        public delegate void SendWidthHeightDelegate(int Width, int height);
        /// <summary>
        /// 主页自适应之后，传递当前宽高给子panel
        /// </summary>
        public static SendWidthHeightDelegate SendWidthHeightEvent;

        /// <summary>
        /// 红外光栅 委托  InfraredGrating
        /// </summary>
        /// <param name="data"></param>
        public delegate void InfraredGratingDelegate(int data);
        /// <summary>
        /// 红外光栅 委托  InfraredGrating
        /// </summary>
        public static InfraredGratingDelegate InfraredGratingEvent;

        /// <summary>
        /// 页面消息提醒 委托  InfoMessage
        /// </summary>
        /// <param name="str"></param>
        /// <param name="showLed"></param>
        public delegate void InfoMessageDelegate(string str);
        /// <summary>
        /// 页面消息提醒 委托  InfoMessage
        /// </summary>
        public static InfoMessageDelegate InfoMessageEvent;

        /// <summary>
        /// 远瑞通读卡器 委托
        /// </summary>
        /// <param name="btAryBuffer"></param>
        public delegate void YRTReaderDelegate(byte[] btAryBuffer);
        /// <summary>
        /// 远瑞通读卡器 事件
        /// </summary>
        public static YRTReaderDelegate YRTReaderEvent;

        /// <summary>
        /// 上海耀华磅表 xk3190-a9
        /// 兼容 宁波柯力d2008
        /// </summary>
        /// <param name="btAryBuffer"></param>
        public delegate void A9Delegate(byte[] weight);
        /// <summary>
        /// 上海耀华磅表 xk3190-a9
        /// 兼容 宁波柯力d2008
        /// </summary>
        public static A9Delegate A9Event;

        /// <summary>
        /// 上海耀华磅表 xk3190-a9
        /// 兼容 宁波柯力d2008
        /// </summary>
        /// <param name="btAryBuffer"></param>
        public delegate void A9DelegateStr(string str);
        /// <summary>
        /// 上海耀华磅表 xk3190-a9
        /// 兼容 宁波柯力d2008
        /// </summary>
        public static A9DelegateStr A9EventStr;

        /// <summary>
        /// 上海耀华磅表 xk3190-a9
        /// 兼容 宁波柯力d2008
        /// </summary>
        /// <param name="btAryBuffer"></param>
        public delegate void NRA9Delegate(decimal weight);
        /// <summary>
        /// 上海耀华磅表 xk3190-a9
        /// 兼容 宁波柯力d2008
        /// </summary>
        public static NRA9Delegate NRA9Event;
    }
}
